GtkScrolledWindow: reset scroll history if it contained no real history
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 27 Jul 2016 18:23:35 +0000 (20:23 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 27 Jul 2016 18:29:38 +0000 (20:29 +0200)
Scroll history must refer to a timespan for the values to be valid, otherwise
we return FALSE, in this case the stored event(s) should be discarded anyway.

gtk/gtkscrolledwindow.c

index 17f25e015ac22605ba769767ee80f163c9e3de7b..0a7a52fa2653b10700733fb99ad80581955f079a 100644 (file)
@@ -1347,7 +1347,10 @@ scroll_history_finish (GtkScrolledWindow *sw,
     }
 
   if (last == first)
-    return FALSE;
+    {
+      scroll_history_reset (sw);
+      return FALSE;
+    }
 
   xunit = get_scroll_unit (sw, GTK_ORIENTATION_HORIZONTAL);
   yunit = get_scroll_unit (sw, GTK_ORIENTATION_VERTICAL);